package com.jcxh.sg_exam.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jcxh.sg_exam.pojo.KaochangUser;
import com.jcxh.sg_exam.pojo.vo.NewShicaoVo;
import com.jcxh.sg_exam.pojo.vo.ShicaoVo;
import com.jcxh.sg_exam.service.KaochangUserService;
import com.jcxh.sg_exam.mapper.KaochangUserMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author lenovo
* @description 针对表【kaochang_user】的数据库操作Service实现
* @createDate 2024-08-28 10:31:20
*/
@Service
public class KaochangUserServiceImpl extends ServiceImpl<KaochangUserMapper, KaochangUser>
    implements KaochangUserService{

    @Autowired
    private KaochangUserMapper kaochangUserMapper;
    @Override
    public void removeByUserId(List<Integer> ids) {

        kaochangUserMapper.removeByUserId(ids);
    }


    @Override
    public IPage<ShicaoVo> getShicaoInfo(Integer currentPage, Integer pageSize, String name, String workUnit, String idNumber) {

        IPage<ShicaoVo> shicaoVoIPage=new Page<>(currentPage,pageSize);
        return kaochangUserMapper.getShicaoInfo(shicaoVoIPage,name,workUnit,idNumber);
    }

    @Override
    public IPage<NewShicaoVo> getNewShicaoInfo(Integer currentPage, Integer pageSize, String name, String workUnit, String idNumber,String type) {

        IPage<NewShicaoVo> shicaoVoIPage=new Page<>(currentPage,pageSize);
        return kaochangUserMapper.getNewShicaoInfo(shicaoVoIPage,name,workUnit,idNumber,type);
    }
}




